#高级函数
#函数的嵌套
# def func():
#     print("你好！")
# def exec():
#     print("开始")
#     func()
#     print("结束")
#
# exec()

#函数定义的位置:可以放在任意的作用域
# def fuc():
#     print("你好")
# def exec():
#     print("开始")
#     def test():
#         print("xiaofeng")
#     test()
#     fuc()
#     print("结束")
# exec()

def func():
    name='xiaofeng'
    def inner():
        print(name)
        return 'wang'
    return inner
v1=func()
print(v1())
v2=func()()
print(v2)